<template>
  <div style="margin: 10px 0px">
    <a :href="website" target="_blank" class="job">
      <el-card shadow="hover">
        <div class="item-box">
          <span class="title">{{ title }}</span>
          <span class="datetime">发布日期: {{ datetime }}</span>
        </div>
        <!-- tags -->
        <div style="text-align: left">
          <el-tag
            class="tag-item"
            type="warning"
            effect="light"
            v-for="(item, index) in tags"
            :key="index + 1"
            >{{ item }}</el-tag
          >
        </div>
      </el-card>
    </a>
  </div>
</template>

<script>
export default {
  name: "jobItem",
  props: ["title", "tags", "datetime", "website"],
  data() {
    return {};
  },
};
</script>

<style scoped>
.item-box {
  width: 100%;
  /* padding: 10px 0px; */
  display: -webkit-flex;
  display: flex;
  flex-direction: row; /* 水平方向 */
  flex-wrap: nowrap; /* 超出换行 */
  justify-content: space-between;
}

.el-card is-hover-shadow {
  border: 1px solid #96979c;
  background-color: #fff;
  color: #303133;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.title {
  font-size: 18px;
  font-weight: 500;
}

.tag-item {
  margin-right: 5px;
  margin-top: 8px;
}

.datetime {
  color: gray;
  font-size: 15px;
}

.job {
  text-decoration: none;
}

.job:hover {
  color: #c91111;
}
</style>
